package com.jiguang.Electricvehicle;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;

import butterknife.BindView;
import cn.bingoogolapple.qrcode.zbar.ZBarView;

/**
 * @2Do: 扫码充电
 * @Author M2
 * @Version v 1.0
 * @Date 2017/7/6 0006
 */
public class ChargeQrActivity extends BaseQrActivity {

    @Override
    protected void onViewCreated() {
        //设置状态栏主题色
        TranslucentCompat.transparencyBar(this);
        TranslucentCompat.statusBarLightMode(this);
        ImageButton imageButton = findViewById(R.id.leftHeadImg);
        imageButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

    @Override
    protected void initView() {
        //初始化view

    }

    @Override
    protected void initData() {
        //初始化data

    }

    @Override
    protected View getCaptureScanLine() {
        return captureScanLine;
    }

    @Override
    protected ImageView getBarcodeView() {
        return null;
    }

    @Override
    public void onResume() {
        super.onResume();

    }

    @Override
    protected int getLayoutId() {
        return R.layout.act_charge_qr;
    }

    @Override
    protected void initEventAndData(Bundle extras) {

    }

    @Override
    protected void handleSuccessDecode(String stubId) {
        Log.d("id------", stubId);
        Intent intent = new Intent();
        intent.putExtra("stubId", stubId);
        setResult(100, intent);
        finish();
    }

    @Override
    protected void handleErrorDecode() {

    }


}
